package fhp.hlhj.giantfold.module

import com.lzy.okgo.model.HttpParams
import fhp.hlhj.giantfold.interfaces.BaseModuleInterface
import fhp.hlhj.giantfold.javaBean.GetRedBean
import fhp.hlhj.giantfold.network.UrlApis

/**
 * Created by Administrator on 2018\2\10 0010.
 */
class DayRedModule {
    interface OnDayRedOnResp:BaseModuleInterface<GetRedBean>

    fun getRed(params: HttpParams,listener:OnDayRedOnResp){
        UrlApis.getRed(params)
                .doOnSubscribe {
                    listener.showLoading()
                }
                .subscribe({
                    data->
                    listener.onResp(data)
                })
    }
}